







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Finds the first occurence of count consecutive equal items in the
list.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static int FirstConsecutiveEqual<T>( IList<T> list, int count ) |
Visual Basic (Declaration) |
---|
Public Shared Function FirstConsecutiveEqual(Of T) ( _ list As IList(Of T), _ count As Integer _ ) As Integer |
Visual C++ |
---|
public: generic<typename T> static int FirstConsecutiveEqual ( IList<T>^ list, int count ) |
Parameters
- list
- IList<(Of <T>)>
The list to examine.
- count
- Int32
The number of consecutive equal items to look for. The count must be at least 1.
Return Value
The index of the first item in the first run of count consecutive equal items, or -1 if no such run exists..
Type Parameters
- T
Remarks
The default sense of equality for T is used, as defined by T's
implementation of IComparable<T>.Equals or object.Equals.
See Also
Algorithms Class
Wintellect.PowerCollections Namespace